﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using Skin2D.Display;
using System.Drawing.Drawing2D;

namespace Skin2D.Control
{
    class ICursor
    {
        public ICursor(ToolStripButton button)
        {
            m_button = button;
        }

        public void setCheckState(CheckState state)
        {
            m_button.CheckState = state;
        }

        public virtual void OnMouseDown(MouseEventArgs e)
        {
        }

        public virtual void OnMouseUp(MouseEventArgs e)
        {
        }

        public virtual void OnMouseMove(MouseEventArgs e)
        {
        }

        public void TransfromToCamera(ref PointF point)
        {
            Matrix mat = DisplayDriver.Get().Camera.InvViewMatrix;
            PointF[] tmp = new PointF[] { point };
            mat.TransformPoints(tmp);

            point = tmp[0];
        }

        public CurrsorType Type { get; set; }

        private ToolStripButton m_button;
    }
}
